﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Host.Model;
using Host.DB;

namespace Host.CTR
{
   public class locationCtr
    {
       private dbLocation dbl = new dbLocation();
       private dbTest dbt = new dbTest();

       public locationCtr()
       {

       }
        
       public List<location> getLocation()
       {
           
          return dbl.GetCities();

       }

       public location getCityByID(string ID)
       {
           return dbl.GetCityByID(ID);
        }

       public location insertLocation(String City)
       {
           
           location location = new location(City);
           dbl.insertLocation(location);
           return location;
       }

       public location updateLocation(String City, int ID)
       {
           location location = new location(City);
           dbl.updateLocation(City, ID);
           return location;
       }

      
    }
}
